Use this function as an alternative to def-instrument-rhythm when you wish to align symbols exactly with note-lengths negative values in a length pattern produce corresponding pause-symbols.
In def-instrument-rhythm the following occurs:
(def-instrument-rhythm
; 1 2
; !---.---
solo '1/16 "- - --- " (a b c)
)
(get-symbols-of 'solo)
--> (a = b = c a b =)
With the function align-to-length this output can replicated:
(align-to-length
'(1/16 -1/16 1/16 -1/16 1/16 1/16 1/16 -1/16)
'(a b c))
--> (a = b = c a b =)
Note that when a symbol-pattern already contains a pause-symbol the symbol is omitted, as in the function fill-template-except:
(align-to-length '(1/4 1/8 1/4 1/4 -1/4 1/4 1/4)
'(a = c d = e f g))
--> (a c d e = f g)
The function can also be used to build chord patterns that match existing length patterns.